#!/usr/bin/env python3

from pylab import *

fp = open('weights_dcds.txt', 'w')

# 1MHz
# 26Mhz
#w_size = 22

#for cnt in range(w_size):
#    for os in range(16):
#        if cnt >=7 and cnt <= 9:
#            w = 1./3
#        elif cnt >=16 and cnt <= 18:
#            w = -1./3
#        else:
#            w = 0
#
#        fp.write('%12.8f '%(w)) 
#
#    fp.write('\n')

# 1Mhz
# 39MHz
w_size = 36

for cnt in range(w_size):
   for os in range(16):
       if os==9:
           if cnt >=11 and cnt <= 15:
               w = 1./5
           elif cnt >=28 and cnt <= 32:
               w = -1./5
           else:
               w = 0
       else:
           if cnt >=11 and cnt <= 15:
               w = 1./5
           elif cnt >=28 and cnt <= 32:
               w = -1./5
           else:
               w = 0

       fp.write('%12.8f '%(w))

   fp.write('\n')


# w_size = 68

# for cnt in range(w_size):
#     for os in range(16):
#         if cnt >=16 and cnt <= 32:
#             w = 1./17
#         elif cnt >=49 and cnt <= 63:
#             w = -1./15
#         else:
#             w = 0

#         fp.write('%12.8f '%(w)) 

#     fp.write('\n')







# 200kHz
#w_size = 110

#for cnt in range(w_size):
#    for os in range(16):
#        if cnt >=10 and cnt <= 50:
#            w = 1./41
#        elif cnt >=60 and cnt <= 100:
#            w = -1./41
#        else:
#            w = 0

#        fp.write('%12.8f '%(w)) 

#    fp.write('\n')

fp.close()

